import java.util.*;
public class Math1 {
    public static void main(String[] args) {
        Random a = new Random();
        Scanner b = new Scanner(System.in);
        String[] opear = {"-", "+", "*", "/"};
        int num1, num2, num3;
        System.out.println("请输入题目的个数");
        num1 = b.nextInt();
        num2 = a.nextInt(3);
        num3 = a.nextInt(3);
        // System.out.println(num2 );
        //System.out.println(num3);
        for (int i = 0; i < num1; i++) {
            int firstnum = a.nextInt(1000);
            int secondnum = a.nextInt(1000);
            int thirdnum = a.nextInt(1000);
            int opeart = a.nextInt(4) + 1;
            if (opeart == 1) ;
            {
                System.out.println(firstnum + "+" + secondnum + "=?");
            }
            if (opeart == 2) {
                System.out.println(firstnum + "-" + secondnum + "=?");
            }
            if (opeart == 3) {
                System.out.println(firstnum + "*" + secondnum + "=?");
            }
            if (opeart == 4) {
                if (secondnum != 0)
                    System.out.println(firstnum + "/" + secondnum + "=?");
            } else if (firstnum != 0) {
                System.out.println(secondnum + "/" + firstnum + "=?");
            }
            if(opeart == 5){
                System.out.println();
            }

        }

    }
}


